<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/bootstrap.min.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/bootstrap-responsive.min.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/uniform.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/matrix-style2.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/matrix-media.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/font-awesome/css/font-awesome.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/changyun.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
</head>
<body>
<div id="content">
  <include file="Public/maintop" />
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
        <div class="widget-box">
		  <div class="widget-content" style="padding:5px;border:0px;">
			<div class="fl table-button">
				<a href="{#:U('add')}" class="btn btn-success"><i class="icon-plus"></i> 新增</a> 
			</div>
			<form action="__ACTION__" method="get">
			<div class="fr table-button"><button type="submit" class="btn btn-success"><i class="icon-search"></i> 搜索</button></div>
			<div class="fr table-button">
				<input type="text" name="name" placeholder="请输入用户名" value="{#$Think.get.name}">
			</div>
			</form>
		  </div>
		  
          <div class="widget-content" style="padding:5px;">
            <table class="table table-bordered table-striped with-check">
              <thead>
                <tr>
				  <th>UID</th>
				  <th class="">用户名</th>
					<th class="">绑定城市</th>
				  <th class="">最后登录时间</th>
				  <th class="">最后登录IP</th>
				  <th class="">状态</th>
				  <th class="">操作</th>
                </tr>
              </thead>
              <tbody>
			  <notempty name="list">
			  <volist name="list" id="admin">
                <tr>
				  <td>{#$admin.id}</td>
				  <td>{#$admin.user_login}</td>
					<td>{#$admin.u_province}-{#$admin.u_city}-{#$admin.u_district}</td>
                  <td>{#$admin.last_login_time|time_format}</td>
                  <td>{#$admin.last_login_ip}</td>
                  <td>
					<eq name="admin.user_status" value="1">
					<a href="{#:U('Admin/changeStatus?method=forbidUser&id='.$admin['id'])}" class="btn btn-mini btn-success">正常</a>
					<else/>
					<a href="{#:U('Admin/changeStatus?method=resumeUser&id='.$admin['id'])}" class="btn btn-mini btn-danger">禁用</a>
					</eq>
				  </td>
				  <td style="width:220px;">
				    <a title="授权" data_url="{#:U('setAuth?id='.$admin['id'])}" href="javascript:void(0);" onclick="edit_access(this)" class="btn btn-mini btn-warning"><i class="icon-pencil"></i> 授权</a>
					<a title="编辑" href="{#:U('edit?id='.$admin['id'])}" class="btn btn-mini btn-success"><i class="icon-pencil"></i> 编辑</a>
					<a title="删除" href="javascript:void(0);" onclick="dodel('{#:U('Admin/changeStatus?method=deleteuser&id='.$admin['id'])}')" class="btn btn-mini btn-danger"><i class="icon-remove"></i> 删除</a>
					</td>
                </tr>
				</volist>
				<else/>
				<td colspan="8" class="text-center"> 暂时还没有内容! </td>
				</notempty>
              </tbody>
            </table>
			<div id="hongxin_page_view">{#$page_show}</div>
          </div>
        </div>
	  </div>
    </div>
  </div>
</div>

<script src="__JS__/jquery.min.js"></script> 
<script src="__JS__/jquery.ui.custom.js"></script> 
<script src="__JS__/bootstrap.min.js"></script> 
<script src="__JS__/jquery.uniform.js"></script> 
<script src="__JS__/select2.min.js"></script> 
<script src="__JS__/matrix.js"></script> 
<script src="__JS__/matrix.tables.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>
function dodel(jump_url){
	layer.confirm('确定要删除吗', {
		title:'提示',
		icon: 0,
		btn: ['确定','取消'] //按钮
	}, function(e){
		window.location.href = jump_url;
		layer.close(e);
	}, function(e){
		layer.close(e);
	});
}
function edit_access(e){
	layer.open({
		type : 2,
		offset: '100px',
		title : '授权操作',
		area : ['600px', '300px'],
		content:$(e).attr("data_url"),
		success: function(layero, index){
			//layer.iframeAuto(index);
		}
	});
}
</script>
</body>
</html>
